The client stub reads the network messages from the kernel through the use of RPC runtime routines. 客户端存根通过使用RPC运行时例程从内核中读取网络消息。
Every remote method call involves transferring data from the client EJB stub to the server and back to the client EJB stub generating network traffic. 每个远程方法调用都包括将数据从客户机EJB存根传送到服务器,然后再传送回产生网络流量的客户机EJB存根。
Once RPC call is executed, the results are put back by the server stub and server runtime to the network which reaches the client. 执行RPC调用之后,服务器stub和服务器运行时把结果发送回客户机。
By stubbing out the network client we can now test the getBalance method. 通过网络客户端stub,我们现在能够测试getBalance方法。
This test asserts that the network client is only used once by simply throwing an error from the network stub after the first use of it. 测试断言,网络客户端只被调用了一次,第一次使用之后网络stub就简单地抛出错误。